package com.chuangke.system.listener;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.event.EventListener;
import org.springframework.scheduling.annotation.Async;

import com.chuangke.system.event.CommentUpdateEvent;
import com.chuangke.system.service.SysCommentService;

@Configuration
public class CommentHandleListener {

	@Autowired
	private SysCommentService sysCommentService;

	@Async
	@EventListener
	public void handleOptLogUpdateEvent(CommentUpdateEvent event) {
		sysCommentService.update(event.getObjType(), event.getObjId(), event.getObjName());
	}

}
